package ast;

import lexer.Position;

public class NumberNode extends ExpressionNode {
	
	@Override
	public String toString() {
		return "NumberNode [value=" + value + "]";
	}

	public long getValue() {
		return value;
	}

	private final long value;
	
	public NumberNode(Position position, String value) {
		super(position);
		this.value = Integer.parseInt(value);
	}
	
	public long collapseExp() throws Exception {
		return this.value;
	}

}
